package com.qingcheng.timer;

import com.qingcheng.pojo.goods.StockBack;
import com.qingcheng.service.StockBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class SkuTask {

    @Autowired
    private StockBackService stockBackService;

//    @Scheduled(cron = "0 0 0/1 * * ?")
    @Scheduled(cron = "0 * * * * *")
    public void orderItemOrderLogic(){
        System.out.println("执行库存回滚");
        stockBackService.doBack();
    }
}
